/**
 * Copyright &copy; 2012-2017 <a href="https://vivo.com">vivo</a> All rights reserved.
 */
package com.vivo.wares.service;

import java.util.List;
import java.util.WeakHashMap;

import com.vivo.employee.entity.WaresSerialMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.service.CrudService;
import com.vivo.wares.entity.VivoWaresSerialAh;
import com.vivo.wares.dao.VivoWaresSerialAhDao;

/**
 * 商品系列管理Service
 * @author jyangye
 * @version 2018-01-28
 */
@Service
@Transactional(readOnly = true)
public class VivoWaresSerialAhService extends CrudService<VivoWaresSerialAhDao, VivoWaresSerialAh> {

    @Autowired
    private VivoWaresSerialAhDao vivoWaresSerialAhDao;

    public List<WaresSerialMap> selectMapBySerial(VivoWaresSerialAh vivoWaresSerialAh) {
        return vivoWaresSerialAhDao.selectMapBySerial(vivoWaresSerialAh);
    }

	public VivoWaresSerialAh get(String id) {
		return super.get(id);
	}
	public VivoWaresSerialAh get(VivoWaresSerialAh vivoWaresSerial) {
		return super.get(vivoWaresSerial);
	}


	public VivoWaresSerialAh getByName(VivoWaresSerialAh vivoWaresSerial) {
		List<VivoWaresSerialAh> list = vivoWaresSerialAhDao.getByName(vivoWaresSerial);
		if (list.size()> 0) {
		    return list.get(0);
        }

        return null;
	}



	public List<VivoWaresSerialAh> findList(VivoWaresSerialAh vivoWaresSerialAh) {
		return super.findList(vivoWaresSerialAh);
	}
	
	public Page<VivoWaresSerialAh> findPage(Page<VivoWaresSerialAh> page, VivoWaresSerialAh vivoWaresSerialAh) {
		return super.findPage(page, vivoWaresSerialAh);
	}
	
	@Transactional(readOnly = false)
	public void save(VivoWaresSerialAh vivoWaresSerialAh) {
		super.save(vivoWaresSerialAh);
	}
	
	@Transactional(readOnly = false)
	public void delete(VivoWaresSerialAh vivoWaresSerialAh) {
		super.delete(vivoWaresSerialAh);
	}
	
}